<template>
  <a-config-provider :locale="zh_CN">
    <div id="app">
      <a-spin :spinning="Loading" tip="加载中...">
        <router-view></router-view>
      </a-spin>
    </div>
  </a-config-provider>
</template>

<script lang="ts">
import { Component, Prop, Vue } from "vue-property-decorator";
import zhCN from "ant-design-vue/lib/locale-provider/zh_CN";
import { Getter, Action, State } from 'vuex-class';

@Component({})

export default class App extends Vue {
  @Prop() private msg!: string;
  zh_CN: string = zhCN;

  @State( state => state.user.token) token;

  @State( state => state.app.loading) Loading;


  @Action('setToken') setToken;

  created() {
    this.setToken('ccc');
    // console.log(this.Loading)
    // console.log(this.token);
    
    // console.log(this);
    this.axios.get('/mockdata',{params: {name: 'test'},timeout: 2000 })
  }

}
</script>

<style>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
